home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 7 / FM Towns Free Software Collection 7.iso / taropyon / guilib3 / inc / dlg / dlglst.h < prev    next >
C/C++ Source or Header  |  1993-11-30  |  3KB  |  94 lines

  1. #ifndef    _DLGLST_H
  2. #define    _DLGLST_H
  3.  
  4. #ifndef    _SBAR_H
  5. #    include    <sbar.h>
  6. #endif
  7. #ifndef    _EVENT_H
  8. #    include    <event.h>
  9. #endif
  10. #ifndef    _MOUSE_H
  11. #    include    <mouse.h>
  12. #endif
  13. #ifndef    _GST_H
  14. #    include    <gst.h>
  15. #endif
  16.  
  17. typedef    struct    _dlgLstMnu_t
  18. {
  19.     struct    _dlgLstMnu_t    *next;
  20.     char                    *msg;
  21.  
  22.     int                        attr;
  23.     int                        (*func)(int,EVTSBJ_T *);
  24.     void                    *ptr;
  25. } DLGLSTMNU_T;
  26.  
  27. typedef    struct
  28. {
  29.     int            attr;
  30.     MOSTKP_T    *mosTk;
  31.     EVT_T        *evt;
  32.     EVT_T        *selEvt;
  33.     SBAR_T        *sbV;
  34.     SBAR_T        *sbH;
  35.     char        *title;
  36.     char        *guideMsg;
  37.  
  38.     FRAME        fr;
  39.     int            fntX ,fntY;
  40.     int            hX, hY;
  41.     int            dspTopX, dspTopY;
  42.     int            dspXn, dspYn;
  43.  
  44.     int            canEvtNo;            /* イベントキャンセル用    */
  45.     int            endEvtNo;            /* キャンセル用            */
  46.     int            selNo;                /* 選択中の番号            */
  47.  
  48.     int            selN;
  49.     int            objN;
  50.     DLGLSTOBJ_T    *obj;
  51.  
  52.     int            mnuN;        /* メニューの項目数    */
  53.     DLGLSTMNU_T    *mnuTop;
  54.  
  55.     COLOR        colTbl[32];
  56. } DLGLST_T;
  57.  
  58. #define    DLGLST_COLTBAC(dlgLst)    ((dlgLst)->colTbl[0])
  59. #define    DLGLST_COLTSTR(dlgLst)    ((dlgLst)->colTbl[1])
  60. #define    DLGLST_COLTHIL(dlgLst)    ((dlgLst)->colTbl[2])
  61. #define    DLGLST_COLTSHA(dlgLst)    ((dlgLst)->colTbl[3])
  62.  
  63. #define    DLGLST_COLWBAC(dlgLst)    ((dlgLst)->colTbl[4])
  64. #define    DLGLST_COLWSTR(dlgLst)    ((dlgLst)->colTbl[5])
  65. #define    DLGLST_COLWHIL(dlgLst)    ((dlgLst)->colTbl[6])
  66. #define    DLGLST_COLWSHA(dlgLst)    ((dlgLst)->colTbl[7])
  67.  
  68. #define    DLGLST_COLSBAC(dlgLst)    ((dlgLst)->colTbl[8])
  69. #define    DLGLST_COLSSTR(dlgLst)    ((dlgLst)->colTbl[9])
  70. #define    DLGLST_COLSHIL(dlgLst)    ((dlgLst)->colTbl[10])
  71. #define    DLGLST_COLSSHA(dlgLst)    ((dlgLst)->colTbl[11])
  72.  
  73. #define    DLGLST_COLBBAC(dlgLst)    ((dlgLst)->colTbl[12])
  74. #define    DLGLST_COLBSTR(dlgLst)    ((dlgLst)->colTbl[13])
  75. #define    DLGLST_COLBHIL(dlgLst)    ((dlgLst)->colTbl[14])
  76. #define    DLGLST_COLBSHA(dlgLst)    ((dlgLst)->colTbl[15])
  77.  
  78. #if    0
  79. /*    設定用マクロ    */
  80. #define    DLGLST_SETSEL_TYP(_obj,_objPos,_selPos,_typ)        _obj[_objPos].sel[_selPos].typ = (_typ)
  81. #define    DLGLST_SETSEL_EVTATT(_obj,_objPos,_selPos,_eatt)    _obj[_objPos].sel[_selPos].eatt = (_eatt)
  82. #define    DLGLST_SETSEL_MSGATT(_obj,_objPos,_selPos,_matt)    _obj[_objPos].sel[_selPos].matt = (_matt)
  83. #define    DLGLST_SETSEL_BTNATT(_obj,_objPos,_selPos,_batt)    _obj[_objPos].sel[_selPos].matt = (_batt)
  84. #define    DLGLST_SETSEL_FIELD(_obj,_objPos,_selPos,_flen)        _obj[_objPos].sel[_selPos].flen = (_flen)
  85. #define    DLGLST_SETSEL_EVT(_obj,_attr,_objPos,_selPos,_evtNo,_func,_ptr)    {    \
  86.     _obj[_objPos].sel[_selPos].attr  = (_attr);                                \
  87.     _obj[_objPos].sel[_selPos].evtNo = (_evtNo);                            \
  88.     _obj[_objPos].sel[_selPos].func  = (_func);                                \
  89.     _obj[_objPos].sel[_selPos].ptr   = (_ptr);                                \
  90. }
  91. #endif
  92.  
  93. #endif
  94.